using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Entities;
using BUS;
using Utility;

public partial class Admin_ThemDoanhnghiep : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btn_them_Click(object sender, EventArgs e)
    {
        try
        {
            tbDoanhnghiep doanhnghiep = new tbDoanhnghiep();
            doanhnghiep.Tendnghiep = txt_tendnghiep.Text;
            doanhnghiep.Diachi = txt_diachi.Text;
            doanhnghiep.Matkhau = txt_matkhau.Text;
            doanhnghiep.Tendnhap = txt_tendnhap.Text;
            doanhnghiep.Website = txt_website.Text;
            doanhnghiep.Dienthoai = txt_dt.Text;
            doanhnghiep.Giomocua = txt_gmc.Text;
            tbDoanhnghiepBUS.Insert(doanhnghiep);
            Response.Redirect("~/Admin/DanhsachDoanhnghiep.aspx");
            
        }
        catch
        {
            Response.Redirect("~/Admin/DanhsachDoanhnghiep.aspx");

        }
        
    }
}
